#ifndef MYPLAYER_H
#define MYPLAYER_H

#include "MyDefinitions.h"

class MyGame;

/*! 
 *  \class MyPlayer
 *  \brief Class with player information
 *  \author Peter Kosa
 *  \version 1.52
 *  \date    2006-2008
 */
class MyPlayer
{
public:
	MyPlayer(MyGame* _this);
	~MyPlayer();	
	/*! reset player to beginning state */
	void reset();
	/*! load player sprite images */
	void load_imgs();
	/*! move player to the center of the screen */
	void center();
	/*! move player */
	void move_player(int);
	/*! handle player death */
	void player_died();
	/*! handle player level up */
	void level_up();
	/*! player shooting */
	void player_shoot(int,int);
	/*! draw player on the screen */
	void draw_player();
  /*! decide movement phase the player is in */
	int decide_phase();
	/*! get the rect in which the player will be hit */
	SDL_Rect* get_hit_zone();
	/*! encapsulation */
	void loose_life(int dmgTaken);
/**********ENCAPSULATION************start*/
  /*! encapsulation */
	int get_level();
	/*! encapsulation */
	int get_money();
	/*! encapsulation */
	void set_money_d(int);
	/*! encapsulation */
	void set_exp_d(int _exp);
	/*! encapsulation */
	int get_exp_cur();
	/*! encapsulation */
	int get_exp_needed(int);
	/*! method for infobar drawing */
	int get_exp_line_size();
	/*! encapsulation */
	double get_pos_x();
	/*! encapsulation */
	double get_pos_y();
	/*! encapsulation */
	void set_pos_dx(double dx);
	/*! encapsulation */
	void set_pos_dy(double dy);
	/*! encapsulation */
	double get_acc_x();
	/*! encapsulation */
	double get_acc_y();
	/*! encapsulation */
	void set_acc_x(double ax);
	/*! encapsulation */
	void set_acc_y(double ay);
	/*! encapsulation */
	double get_speed_x();
	/*! encapsulation */
	double get_speed_y();
	/*! encapsulation */
	void set_speed_xy(double sx, double sy);
	/*! encapsulation */
	void set_speed_dx(double sx);
	/*! encapsulation */
	void set_speed_dy(double sy);
	/*! encapsulation */
	int get_cur_life();
	/*! encapsulation */
	int get_max_life();
	/*! encapsulation */
	void set_cur_life(int);
	/*! encapsulation */
	void set_max_life(int);
	/*! encapsulation */
	int get_cur_mana();
	/*! encapsulation */
	int get_max_mana();
	/*! encapsulation */
	void set_cur_mana(int);
	/*! encapsulation */
	void set_max_mana(int);
	/*! encapsulation */
	double get_weapon_angle();
	/*! encapsulation */
	void set_weapon_angle(double);
	/*! encapsulation */
	void set_weapon_angle_d(double);
	/*! encapsulation */
	void enemy_killed();
	/*! encapsulation */
	int get_enemies_killed();
	/*! method for buying boosts in the village */
	int get_random_boost();
/**************ENCAPSULATION************end*/	
private:	
	int max_life, max_mana, cur_life, cur_mana;
	int movement_phase, moveType, timeMoving;
	int shotPause, shotWaited, spellWaited;
	int enemiesKilled, money, kill_cap;
	double pos_x, pos_y, old_x_pos, old_y_pos, acc_x, acc_y, speed_x, speed_y;
	double weapon_angle;
	bool first;
	
	/*! player movement sprites */
	SDL_Surface *playerSheet;			
	int exp, level, movementPause, movementDirection;
	MyGame* parent;	
};	
#endif
